package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 报警器设备状态更新表
 * </p>
 *
 * @author guoliang.lao
 * @since 2022-08-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_alarm_device_state")
@ApiModel(value="DeviceState对象", description="报警器设备状态更新表")
public class DeviceState extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "报警器设备表主键")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "主电电量百分比")
    @TableField("main_battery_value")
    private Integer mainBatteryValue;

    @ApiModelProperty(value = "有无备电 0-否，1-是（根据上报值更新）")
    @TableField("spare_battery_enabled")
    private Integer spareBatteryEnabled;

    @ApiModelProperty(value = "探测器总数")
    @TableField("detector_count")
    private Integer detectorCount;

    @ApiModelProperty(value = "小区ID")
    @TableField("cell_id")
    private Integer cellId;

    @ApiModelProperty(value = "通信信号强度")
    @TableField("`signal`")
    private Integer signal;

    @ApiModelProperty(value = "设备状态 0-离线,1-正常,2-低报,3-高报,4-故障,6-报警")
    @TableField("device_status")
    private Integer deviceStatus;

    @ApiModelProperty(value = "设备状态说明")
    @TableField("device_status_info")
    private String deviceStatusInfo;

    @ApiModelProperty(value = "浓度值")
    @TableField("concentration")
    private Integer concentration;

    @ApiModelProperty(value = "温度")
    @TableField("temperature")
    private Integer temperature;

    @ApiModelProperty(value = "湿度")
    @TableField("humidity")
    private Integer humidity;

    @ApiModelProperty(value = "报警器累计工作天数")
    @TableField("working_days")
    private Integer workingDays;

    @ApiModelProperty(value = "是否故障 0-否 1-是")
    @TableField("is_broken")
    private Boolean isBroken;

    @ApiModelProperty(value = "故障信息")
    @TableField("broken_status_info")
    private String brokenStatusInfo;

    @ApiModelProperty(value = "最后一次上报时间")
    @TableField("last_report_time")
    private Date lastReportTime;

    @ApiModelProperty(value = "时钟准确度 0:较高 1:高 2:中 3:低")
    @TableField("clock_accuracy")
    private Integer clockAccuracy;
}
